/* 1. 全局样式重置与基础设置 - 保证跨浏览器一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Microsoft YaHei", "PingFang SC", sans-serif;
    scroll-behavior: smooth; /* 平滑滚动 */
}

:root {
    /* 高级色彩体系 - 低饱和度+高对比度，适配高端定位 */
    --primary-color: #1a202c; /* 主色：深灰蓝（沉稳高级） */
    --secondary-color: #3182ce; /* 辅助色：低饱和蓝（精致点缀） */
    --accent-color: #f6ad55; /* 强调色：暖金橙（提升质感） */
    --neutral-light: #f7fafc; /* 浅色背景：柔和不刺眼 */
    --neutral-dark: #2d3748; /* 深色文本：易读且高级 */
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.05); /* 轻阴影：增强层次 */
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.1); /* 重阴影：突出重点 */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 缓动曲线：流畅自然 */
}

body {
    background-color: var(--neutral-light);
    color: var(--neutral-dark);
    line-height: 1.6;
}

/* 2. 通用组件样式 - 保证风格统一 */
.container {
    width: 100%;
    max-width: 1440px; /* 限制最大宽度，避免大屏变形 */
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    font-weight: 500;
    border-radius: 50px; /* 圆角设计：现代感 */
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-light);
}

.btn:hover {
    background-color: #2b6cb0; /* hover深色变化：反馈清晰 */
    transform: translateY(-2px); /* 轻微上浮：增强交互感 */
    box-shadow: var(--shadow-heavy);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem); /* 响应式字体：适配不同屏幕 */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0.8rem auto 0;
    border-radius: 2px; /* 短横线点缀：提升精致度 */
}

.section {
    padding: 8rem 0; /* 充足留白：高端设计核心 */
}

/* 3. 导航栏样式 - 固定顶部+透明渐变 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 1.5rem 0;
    transition: var(--transition-base);
    background-color: transparent;
}

.navbar.scrolled {
    background-color: white;
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: var(--transition-base);
}

.navbar.scrolled .logo {
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-base);
    position: relative;
}

.navbar.scrolled .nav-link {
    color: var(--neutral-dark);
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition-base);
}

.nav-link:hover::after {
    width: 100%; /* 下划线展开：交互反馈 */
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition-base);
}

.navbar.scrolled .mobile-menu-btn {
    color: var(--primary-color);
}

/* 4. 英雄区样式 - 全屏+背景图+渐变叠加 */
.hero {
    height: 100vh;
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeUp 1s ease-out; /* 入场动画：从下往上 */
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}












/* 轮播图样式 */
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 100%; /* 新增：确保宽度一致 */
    padding: 0 20px; /* 新增：添加内边距避免边缘溢出 */
    will-change: opacity; /* 优化动画性能 */
}

/* 轮播控制按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    z-index: 20;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.indicator.active {
    background-color: white;
    width: 30px;
    border-radius: 6px;
}

/* 为轮播图添加渐变遮罩 */
.sub-slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(26, 32, 44, 0.7), rgba(26, 32, 44, 0.8));
    z-index: 1;
}
/* 确保按钮在轮播图上方 */
.hero-btns {
    position: relative;
    z-index: 20;
    margin-top: 2rem;
}
.sub-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    transform: translateZ(0); /* 新增：启用硬件加速 */
}

.sub-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例并覆盖整个容器，裁剪多余部分 */
    object-position: center; /* 确保图片中心对齐 */
    display: block; /* 消除图片底部间隙 */
}
.hero {
    position: relative;
    height: 100vh; /* 确保英雄区占满整个视口高度 */
    overflow: hidden; /* 隐藏超出容器的部分 */
}
/* 调整主轮播切换时的过渡效果 */
.main-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    transition: all 0.5s ease-in-out; /* 新增：添加过渡效果 */
}

/* 修复英雄区按钮位置 */
.hero-btns {
    position: relative;
    z-index: 20;
    margin-top: 2rem;
    /* 移除可能导致位移的transform属性 */
}






























/* 5. 特色区样式 - 卡片式布局+悬浮动效 */
.features {
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 自适应网格：大屏多列，小屏单列 */
    gap: 2.5rem;
    margin-top: 4rem;
}

.feature-card {
    background-color: var(--neutral-light);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition-base);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(49, 130, 206, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-10px); /* 上浮动效：突出重点 */
    box-shadow: var(--shadow-heavy);
    background-color: white;
}

.feature-card:hover .feature-icon {
    background-color: var(--secondary-color);
    color: white;
    transform: scale(1.1); /* 图标放大：增强交互 */
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-desc {
    color: #718096; /* 浅灰色文本：层次分明 */
    line-height: 1.7;
}

/* 6. 作品展示区 - 瀑布流布局+hover遮罩 */
.portfolio {
    background-color: var(--neutral-light);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background-color: white;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-light);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden; /* 隐藏溢出内容：保证圆角生效 */
    box-shadow: var(--shadow-light);
    transition: var(--transition-base);
}

.portfolio-img {
    width: 100%;
    height: 300px;
    object-fit: cover; /* 图片自适应：避免拉伸 */
    transition: var(--transition-base);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 32, 44, 0.1), rgba(26, 32, 44, 0.8));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-base);
    transform: translateY(20px); /* 初始下移：增强hover效果 */
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05); /* 图片放大：增加动感 */
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-category {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.portfolio-title {
    font-size: 1.3rem;
    font-weight: 600;
}

/* 7. 页脚样式 - 简洁高级+信息分层 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 6rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-col-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.footer-about {
    color: #a0aec0; /* 浅灰文本：层次分明 */
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-base);
}

.social-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-link {
    margin-bottom: 0.8rem;
}

.footer-link a {
    color: #a0aec0;
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-link a:hover {
    color: var(--accent-color);
    padding-left: 5px; /* 左移动效：交互反馈 */
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #a0aec0;
}

.footer-contact-icon {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* 细边框：分隔区域 */
    color: #a0aec0;
    font-size: 0.9rem;
}

/* 8. 动画定义 - 增强页面活力 */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 9. 响应式适配 - 确保移动端体验 */
@media (max-width: 992px) {
    .nav-menu {
        display: none; /* 隐藏桌面导航 */
    }

    .mobile-menu-btn {
        display: block; /* 显示移动端菜单按钮 */
    }

    .section {
        padding: 6rem 0; /* 减少移动端留白 */
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* 移动端缩小卡片宽度 */
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 6vw, 3.5rem); /* 移动端缩小标题字体 */
    }

    .hero-subtitle {
        font-size: clamp(1rem, 2vw, 1.2rem);
    }

    .features-grid {
        gap: 1.5rem; /* 减少移动端卡片间距 */
    }

    .footer-top {
        gap: 2rem; /* 减少页脚列间距 */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem; /* 移动端缩小容器内边距 */
    }

    .hero-btns {
        flex-direction: column; /* 移动端按钮垂直排列 */
        align-items: center;
    }

    .btn {
        width: 80%; /* 移动端按钮占满宽度 */
        text-align: center;
    }

    .portfolio-filter {
        gap: 0.8rem; /* 缩小筛选按钮间距 */
    }

    .filter-btn {
        padding: 0.4rem 1rem; /* 缩小筛选按钮尺寸 */
        font-size: 0.9rem;
    }
}